package com.qf.ticketredis.pojo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
@ApiModel("统一返回结果类")
public class R {

    @ApiModelProperty("请求成功失败的标记")
    private boolean flag;
    @ApiModelProperty("请求成功失败的提示信息")
    private String msg;
    @ApiModelProperty("请求成功的具体数据")
    private Object data;

    public static R success(Object data){
        R r = new R();
        r.setFlag(true);
        r.setData(data);
        return r;
    }
}
